#pragma once

#include <QtCore/QString>

#include "exports.hpp"
#include "Type.hpp"




namespace Engine
{
	namespace Script
	{
		/**
		 * This class is a wrapper around a certain variable from angelscript.
		 *
		 * It carries both a pointer to the actual value, as well as the Type of the variable.
		 */
		class ENGINE_SCRIPT_API Variable
		{
		public:

			Variable(const char* name, void* data, Type type);
			virtual ~Variable();



			/**
			 * @returns the name of the variable.
			 */
			QString name() const;

			/**
			 * @returns the declaration of the variable (ie. "type name")
			 */
			QString declaration() const;

			/**
			 * @returns the type of the variable.
			 */
			Type type() const;

			/**
			 * @returns a string containing the value of the variable
			 */
			QString value() const;

		private:

			QString   m_name;
			void*     m_data;
			Type      m_type;
		};
		///////////////////////////////////////////////////////////////////////////////////////////
	}
	///////////////////////////////////////////////////////////////////////////////////////////////
}
///////////////////////////////////////////////////////////////////////////////////////////////////
